CREATE TABLE `SRLive`.`MsgStockBookQuote` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '',
`updateType` ENUM('None','PrcChange','SizeOnly','PrevPeriod') NOT NULL DEFAULT 'None',
`marketStatus` ENUM('None','PreOpen','PreCross','Cross','Open','Closed','Halted','AfterHours') NOT NULL DEFAULT 'None' COMMENT 'market status (open, halted, etc)',
`bidPrice1` FLOAT NOT NULL DEFAULT 0 COMMENT 'bid price for best price level',
`bidSize1` INT NOT NULL DEFAULT 0 COMMENT 'bid size for best price level',
`bidExch1` ENUM('None','AMEX','NQBX','NSX','FNRA','ISE','EDGA','EDGX','CHX','NYSE','ARCA','NSDQ','CBSX','PSX','BTSY','BATS','CBIDX','IEX','OTC','MPRL','LTSE','MEMX','MXIDX','DJIDX','BXE','CXE','DXE','XETRA','NXAM','NXBR','NXLS','NXML','NXOS','NXP') NOT NULL DEFAULT 'None',
`bidMask1` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'bid exchange bit mask for best bid price level',
`askPrice1` FLOAT NOT NULL DEFAULT 0 COMMENT 'ask price for best price level',
`askSize1` INT NOT NULL DEFAULT 0 COMMENT 'ask size for best price level',
`askExch1` ENUM('None','AMEX','NQBX','NSX','FNRA','ISE','EDGA','EDGX','CHX','NYSE','ARCA','NSDQ','CBSX','PSX','BTSY','BATS','CBIDX','IEX','OTC','MPRL','LTSE','MEMX','MXIDX','DJIDX','BXE','CXE','DXE','XETRA','NXAM','NXBR','NXLS','NXML','NXOS','NXP') NOT NULL DEFAULT 'None' COMMENT 'exchange',
`askMask1` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'ask exchange bit mask for best ask price level',
`bidPrice2` FLOAT NOT NULL DEFAULT 0 COMMENT 'bid price for next best price level',
`bidSize2` INT NOT NULL DEFAULT 0 COMMENT 'bid size for next best price level',
`bidExch2` ENUM('None','AMEX','NQBX','NSX','FNRA','ISE','EDGA','EDGX','CHX','NYSE','ARCA','NSDQ','CBSX','PSX','BTSY','BATS','CBIDX','IEX','OTC','MPRL','LTSE','MEMX','MXIDX','DJIDX','BXE','CXE','DXE','XETRA','NXAM','NXBR','NXLS','NXML','NXOS','NXP') NOT NULL DEFAULT 'None' COMMENT 'exchange',
`bidMask2` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'bid exchange bit mask for next best bid price level',
`askPrice2` FLOAT NOT NULL DEFAULT 0 COMMENT 'ask price for next best price level',
`askSize2` INT NOT NULL DEFAULT 0 COMMENT 'ask size for next best price level',
`askExch2` ENUM('None','AMEX','NQBX','NSX','FNRA','ISE','EDGA','EDGX','CHX','NYSE','ARCA','NSDQ','CBSX','PSX','BTSY','BATS','CBIDX','IEX','OTC','MPRL','LTSE','MEMX','MXIDX','DJIDX','BXE','CXE','DXE','XETRA','NXAM','NXBR','NXLS','NXML','NXOS','NXP') NOT NULL DEFAULT 'None' COMMENT 'exchange',
`askMask2` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'ask exchange bit mask for next best ask price level',
`haltMask` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'bit mask of halted exchanges',
`srcTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'source high precision timestamp (if available)',
`netTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'inbound packet PTP timestamp from SR gateway switch;usually syncronized with facility grandfather clock',
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='This table contains live equity quote records for all CQS/UQDF securities as well as US OTC equity securities, SpiderRock synthetic markets, and a number of major indexes. Each record contains up to two price levels and represents a live snapshot of the book for a specific market.';